home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Digitalfoto 118
/
Digitalfoto 118.iso
/
mac
/
programas
/
00
/
start.swf
/
scripts
/
__Packages
/
com
/
robertpenner
/
easing
/
Circ.as
< prev
next >
Wrap
Text File
|
2009-11-16
|
743b
|
31 lines
class com.robertpenner.easing.Circ
{
function Circ()
{
}
static function easeIn(t, b, c, d)
{
return (- c) * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
}
static function easeOut(t, b, c, d)
{
return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
}
static function easeInOut(t, b, c, d)
{
if((t /= d / 2) < 1)
{
return (- c) / 2 * (Math.sqrt(1 - t * t) - 1) + b;
}
return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
}
static function easeOutIn(t, b, c, d)
{
if((t /= d / 2) < 1)
{
return c / 2 * Math.sqrt(1 - (t = t - 1) * t) + b;
}
return c / 2 * (2 - Math.sqrt(1 - (t = t - 1) * t)) + b;
}
}